﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RegistrationForm.ascx.cs" Inherits="PlatypusPlanner.UserControls.RegistrationForm" %>


 <!-- This is the Regitration Form
        Has Validation Summary and connects to SQL Database PlatypusPlanner pp_user -->
<div>
    <form class="form-horizontal">
        <div class="control-group">
            <div class="controls">
                <asp:ValidationSummary ID="ValidationSummary" runat="server" />
            </div>
        </div>
         <div class="control-group">
            <label class="control-label" for="inputFirstName">First Name</label>
                <div class="controls">
                    <asp:TextBox class="span5" EnableViewState="true" ViewStateMode="Enabled" ID="firstNameTxt" runat="server" placeholder="First Name" ToolTip="Type your First Name here" MaxLength="50"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfv" runat="server" ControlToValidate="firstnameTxt" ErrorMessage="Must enter a First name"></asp:RequiredFieldValidator>
               </div>
          </div>
        <div class="control-group">
            <label class="control-label" for="inputEmail">Last Name</label>
                <div class="controls">                    
                    <asp:TextBox class="span5" ID="lastNameTxt" ViewStateMode="Enabled" runat="server" placeholder="Last Name" ToolTip="Type your Last Name here" MaxLength="50"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvLastName" runat="server" ErrorMessage="Must enter a Last Name" ControlToValidate="lastnameTxt"></asp:RequiredFieldValidator>
               </div>
          </div>
        <div class="control-group">
            <label class="control-label" for="inputEmail">Email</label>
                <div class="controls">
                    <asp:TextBox class="span5" ID="emailTxt" ViewStateMode="Enabled" runat="server" placeholder="user@example.com" ToolTip="Type your Email address here" MaxLength="256"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ErrorMessage="Must enter an email here" ControlToValidate="emailTxt"></asp:RequiredFieldValidator>
                     </div>
          </div>
        <div class="control-group" >
            <label class="control-label" for="inputEmail">UserName</label>
                <div class="controls">
                    <asp:TextBox class="span5" ID="userNameTxt" ViewStateMode="Enabled" runat="server" placeholder="User Name" ToolTip="Type your user name address here" MaxLength="50"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Must enter a user name here" ControlToValidate="userNameTxt"></asp:RequiredFieldValidator>
                     </div>
          </div>
        <div class="control-group">
            <label class="control-label" for="inputAddress">Address</label>
                <div class="controls">
                    <asp:TextBox class="span5" ID="addressTxt" ViewStateMode="Enabled" runat="server" placeholder="Address" ToolTip="Type address here." MaxLength="100" ValidateRequestMode="Disabled"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvAddress" runat="server" ErrorMessage="Must place an address here" ControlToValidate="addressTxt"></asp:RequiredFieldValidator>
               </div>
          </div>
        <div class="control-group">
            <label class="control-label" for="inputCity">City</label>
                <div class="controls">
                     <asp:TextBox class="span5" ID="cityTxt" ViewStateMode="Enabled" runat="server" placeholder="City" ToolTip="Type your City here" MaxLength="100"></asp:TextBox>
                     <asp:RequiredFieldValidator ID="rfvCity" runat="server" ErrorMessage="Must enter a City here" ControlToValidate="cityTxt"></asp:RequiredFieldValidator>
               </div>
          </div>
        <div class="control-group">
            <label class="control-label" for="inputState">State</label>
                <div class="controls">
                     <asp:TextBox class="span5" ID="stateTxt" ViewStateMode="Enabled" runat="server" placeholder="State" ToolTip="Type your State here" MaxLength="50"></asp:TextBox>
                     <asp:RequiredFieldValidator ID="rfvState" runat="server" ErrorMessage="Must enter a State here" ControlToValidate="stateTxt"></asp:RequiredFieldValidator>
               </div>
          </div>
        <div class="control-group">
            <label class="control-label" for="inputZip">Zip Code</label>
                <div class="controls">
                    <asp:TextBox class="span5" ID="zipTxt" ViewStateMode="Enabled" runat="server" placeholder="Zip" ToolTip="Type your Zip address here" MaxLength="50"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvZip" runat="server" ErrorMessage="Must enter a zip here" ControlToValidate="zipTxt"></asp:RequiredFieldValidator>
               </div>
          </div>
        <div class="control-group">
            <label class="control-label" for="inputTimeZone">Time Zone</label>
            </div>
        <div class="control-group">
            <label class="control-label" for="inputPassword">Password</label>
                <div class="controls">
                    <asp:TextBox class="span5" TextMode="Password" ID="passwordTxt" ViewStateMode="Enabled" runat="server" placeholder="Password" ToolTip="Type your desired password here" MaxLength="50"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvPassword" runat="server" ErrorMessage="Must enter a password" ControlToValidate="passwordTxt"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="passwordTxt" runat="server" ValidationExpression="(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{6,20})$" ErrorMessage="Password must be between 6 and 20 characters, contain at least one digit and on alphabetic character, and must not contain special characters."></asp:RegularExpressionValidator>
                </div>
          </div>
        <div class="control-group">
            <label class="control-label" for="inputConfirmPassword">Confirm Password</label>
                <div class="controls">
                    <asp:TextBox class="span5" TextMode="Password" EnableViewState="true" ID="confirmPasswordTxt" ViewStateMode="Enabled" runat="server" placeholder="Confirm Password" ToolTip="Confirm your password here" MaxLength="50"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvConfirmPassword" runat="server" ErrorMessage="Must confirm password here" ControlToValidate="confirmPasswordTxt"></asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="cvConfirmPassword" runat="server" ErrorMessage="Passwords must match" ControlToCompare="passwordTxt" ControlToValidate="confirmPasswordTxt"></asp:CompareValidator>
               </div>
          </div>    
        <div class="control-group">
            <div class="controls">
                <label class="checkbox">
                    <input type="checkbox"> I did not read the terms of agreement but agree anyways.
                </label>
                <asp:Button CssClass="btn" ID="submit" runat="server" Text="Submit" OnClick="submit_Click" />           
                 </div> 
            
            </div> 
        <asp:Label CssClass="alert alert-error" Visible="false" runat="server" ID="errorMessageLbl"></asp:Label>
    </form>
</div>
